
/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"D8975DB4-A417-45A2-9F0F-ED7A15524D25"}
 */
function cerrar(event) {
	var $win = application.getWindow('HAB_FOTOS')
	$win.hide()
	$win.destroy()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"36D1766C-54B9-450B-8A37-28A872DEA501"}
 */
function siguiente(event) {
	var $actual = controller.getSelectedIndex()
	if ($actual == controller.getMaxRecordIndex())
		controller.setSelectedIndex(1)
	else
		controller.setSelectedIndex($actual +1)
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"787461AD-D859-46FC-B064-98A190BA3510"}
 */
function anterior(event) {
	var $actual = controller.getSelectedIndex()
	if ($actual == 1)
		controller.setSelectedIndex(controller.getMaxRecordIndex())
	else
		controller.setSelectedIndex($actual -1)
}
